package com.syas.dao.daos;

import com.syas.base.dao.daos.EntityDao;
import com.syas.dao.interfaces.IGradeDao;
import com.syas.model.models.Grade;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by weigong on 2015/12/5.
 */
@Repository("GradeDao")
public class GradeDao  extends EntityDao<Integer, Grade>  implements IGradeDao{

    @Override
    public List<Grade> getGradeList() {
        return (List<Grade>)this.getSession().createQuery("from Grade").list();
    }

    @Override
    public List<Grade> getStationList() {
        return (List<Grade>)this.getSession().createQuery("from Grade group by station").list();
    }
}
